package com.danjinwulian.device.mapper;

import com.danjinwulian.common.core.domain.entity.IotTenantPower;

import java.util.List;

/**
 * 住客用电Mapper接口
 * 
 * @author ken.h
 * @date 2022-08-23
 */
public interface IotTenantPowerMapper 
{
    /**
     * 查询住客用电
     * 
     * @param tenantPowerId 住客用电主键
     * @return 住客用电
     */
    public IotTenantPower selectIotTenantPowerByTenantPowerId(Long tenantPowerId);

    /**
     * 查询住客用电列表
     * 
     * @param iotTenantPower 住客用电
     * @return 住客用电集合
     */
    public List<IotTenantPower> selectIotTenantPowerList(IotTenantPower iotTenantPower);

    /**
     * 新增住客用电
     * 
     * @param iotTenantPower 住客用电
     * @return 结果
     */
    public int insertIotTenantPower(IotTenantPower iotTenantPower);

    /**
     * 修改住客用电
     * 
     * @param iotTenantPower 住客用电
     * @return 结果
     */
    public int updateIotTenantPower(IotTenantPower iotTenantPower);

    /**
     * 删除住客用电
     * 
     * @param tenantPowerId 住客用电主键
     * @return 结果
     */
    public int deleteIotTenantPowerByTenantPowerId(Long tenantPowerId);

    /**
     * 批量删除住客用电
     * 
     * @param tenantPowerIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteIotTenantPowerByTenantPowerIds(Long[] tenantPowerIds);

    public List<IotTenantPower> takePowerDate(Long deviceId);

    public List<IotTenantPower> savePowerDate(IotTenantPower tenantPower);
    public IotTenantPower savePowerDuration(IotTenantPower tenantPower);

    public List<IotTenantPower> usePowerRecord(IotTenantPower tenantPower);
}
